#ifndef MAINPLOT_H
#define MAINPLOT_H

#include <qwt_plot.h>

class MainPlot : public QwtPlot
{
    Q_OBJECT

    bool isDragging;
    QCursor cursor;
    int cursorStartDragPosX;
    int cursorStartDragPosY;
    double kx;
    double ky;
    double lBnd;
    double rBnd;
    double tBnd;
    double bBnd;

    QwtPlot::Axis axX;
    QwtPlot::Axis axY;

public:
    enum ScEngType
    {
        Linear = 0,
        Log10
    };

private:
    ScEngType scaleEngType;

public:
    explicit MainPlot( QWidget * parent = 0 );

    QwtPlot::Axis AxisX() { return axX; }
    QwtPlot::Axis AxisY() { return axY; }

    void SetAxisScaleEngie( QwtPlot::Axis ax, ScEngType t = Linear );

    ScEngType ScaleEngineType() { return scaleEngType; }
    void ScaleEngineType( ScEngType t ) { scaleEngType = t; }

private:
    virtual bool eventFilter( QObject * obj, QEvent * e );
    
signals:
    
private slots:
    
};

#endif // MAINPLOT_H
